<?php 
/* SVN FILE: $Id$ */
/* Student Test cases generated on: 2009-11-20 06:36:46 : 1258699006*/
App::import('Model', 'Student');

class StudentTestCase extends CakeTestCase {
	var $Student = null;
	var $fixtures = array('app.student', 'app.student_minority', 'app.student_province', 'app.student_resume', 'app.application');

	function startTest() {
		$this->Student =& ClassRegistry::init('Student');
	}

	function testStudentInstance() {
		$this->assertTrue(is_a($this->Student, 'Student'));
	}

	function testStudentFind() {
		$this->Student->recursive = -1;
		$results = $this->Student->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('Student' => array(
			'id'  => 1,
			'number'  => 'Lorem ',
			'name'  => 'Lorem ipsum dolor sit amet',
			'gender'  => 'Lo',
			'birthday'  => 'Lorem ip',
			'political'  => 'Lorem ipsum do',
			'student_minority_id'  => 1,
			'student_province_id'  => 1,
			'class'  => 'Lorem ',
			'academic'  => 'Lorem ipsum dolor sit amet',
			'degree'  => 'Lorem ipsum do',
			'email'  => 'Lorem ipsum dolor sit amet',
			'phone'  => 'Lorem ips',
			'password'  => 'Lorem ipsum dolor sit amet',
			'application_count'  => 1,
			'created'  => '2009-11-20 06:36:45',
			'modified'  => '2009-11-20 06:36:45',
			'last_login'  => '2009-11-20 06:36:45',
			'active'  => 1
		));
		$this->assertEqual($results, $expected);
	}
}
?>